use "Individual-level data replication file for political behavior.dta"

** table 1, model 1

xi: ologit ret_socio pi1 pi2 ret_ego pa media i.dem_edu i.dem_agegrp dem_female fam_inc honam yeongnam  if pv1~=. & pi1~=.

** table 1, model 2

xi: ologit ret_socio pv1 pv2 ret_ego pa media i.dem_edu i.dem_agegrp dem_female fam_inc honam yeongnam if pv1~=. & pi1~=.

** table 1, model 3

xi: ologit ret_socio pi1 pi2 pv1 pv2 ret_ego pa media i.dem_edu i.dem_agegrp dem_female fam_inc honam yeongnam if pv1~=. & pi1~=.

** table 1, model 4

xi: ologit ret_socio pv1 pv2 ret_ego pa media i.dem_edu i.dem_agegrp dem_female fam_inc honam yeongnam if pi==3

** table 2, model 1

xi: cmp (ret_socio=pi1 ret_ego pa media honam yeongnam ) (pi1=i.dem_edu i.dem_agegrp dem_female fam_inc  ) if pv1~=. & pi1~=., ind($cmp_oprobit $cmp_probit)

** table 2, model 2

xi: cmp (ret_socio=pi1 ret_ego pa media honam yeongnam ) (pi1=i.dem_edu i.dem_agegrp dem_female fam_inc honam yeongnam ) if pv1~=. & pi1~=., ind($cmp_oprobit $cmp_probit)